<?php
	if($user_data->num_rows()<=0){
		redirect();
	}
	$username=$user_data->row()->username;
	$first_name=$user_data->row()->first_name;
	$last_name=$user_data->row()->last_name;
	$email=$user_data->row()->email;
	$group_id=$user_data->row()->use_user_group_id;
	$status=$user_data->row()->status;
	$user_id=$user_data->row()->user_id;
?>
			<div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header"><i class="fa fa-user fa-fw"></i> <?php echo $this->lang->line('title_update_user');?></h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
<form class="form-horizontal" method="post" action="<?php echo base_url(); ?>users/update-user/<?php echo $user_id;?>">	
		<div class="row">
                <div class="col-lg-12">
                	<?php
					//$this->load->view('help/notifications');
                    ?>
                    <div class="panel panel-default">
                        <div class="panel-heading">
                          User information
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body form-horizontal">
				
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="username"><?php echo $this -> lang -> line('form_label_username'); ?> <span class="star_require">*</span></label>
								<div class="col-md-5">
									<input id="username" name="username" placeholder="" class="form-control input-md" type="text" value="<?php echo $username; ?>" required="required">
									<span class="help-block"><?php echo form_error('username'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="first_name"><?php echo $this->lang->line('form_label_first_name');?> <span class="star_require">*</span></label>
								<div class="col-md-5">
									<input id="first_name" name="first_name" placeholder="" class="form-control input-md" type="text" value="<?php echo $first_name; ?>" required="required">
									<span class="help-block"><?php echo form_error('phone'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="last_name"><?php echo $this->lang->line('form_label_last_name');?> <span class="star_require">*</span></label>
								<div class="col-md-5">
									<input id="last_name" name="last_name" placeholder="" class="form-control input-md" type="text" value="<?php echo $last_name; ?>" required="required">
									<span class="help-block"><?php echo form_error('last_name'); ?></span>
								</div>
							</div>
							
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="email"><?php echo $this -> lang -> line('form_label_email'); ?> <span class="star_require">*</span></label>
								<div class="col-md-5">
									<input id="email" name="email" placeholder="" class="form-control input-md" type="text" value="<?php echo $email ?>" required="required">
									<span class="help-block"><?php echo form_error('email'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="user_group"><?php echo $this -> lang -> line('form_label_user_type'); ?></label>
								<div class="col-md-5">
									
									<select name="user_group"  class="form-control">
										
												<?php echo $dropdown_user_type; ?>
									
									</select>
									<span class="help-block"><?php echo form_error('user_group'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="password"><?php echo $this->lang->line('form_label_password');?> </label>
								<div class="col-md-5">
									<input id="password" name="password" placeholder="" class="form-control input-md" type="password" >
									<span class="help-block"><?php echo form_error('password'); ?></span>
								</div>
							</div>
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="confirm_password"><?php echo $this -> lang -> line('form_label_confirm_password'); ?></label>
								<div class="col-md-5">
									<input id="confirm_password" name="confirm_password" placeholder="" class="form-control input-md" type="password" >
									<span class="help-block"><?php echo form_error('confirm_password'); ?></span>
								</div>
							</div>
							
							
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-4 control-label" for="status"><?php echo $this -> lang -> line('form_label_user_status'); ?></label>
								<div class="col-md-5">
									
									<select name="status"  class="form-control">
											<?php
												if($status==1){
											?>
													<option value="0"><?php echo $this -> lang -> line('common_select_option_disactive'); ?></option>
													<option value="1" selected="selected"><?php echo $this -> lang -> line('common_select_option_active'); ?></option>
											<?php
												}else{
											?>
													<option value="0" selected="selected"><?php echo $this -> lang -> line('common_select_option_disactive'); ?></option>
													<option value="1"><?php echo $this -> lang -> line('common_select_option_active'); ?></option>
											<?php		
												}
											?>
												
									</select>
									
								</div>
							</div>
							
                         </div>
                    </div>
                </div>
           </div>
           
           
           
           <div class="row"><!-- Button (Double) -->
							
                <div class="col-lg-12">
                    	<div class="form-group">
								<label class="col-md-4 control-label" for="submit"></label>
								<div class="col-md-8">
									<button id="submit" name="submit" class="btn btn-success" type="submit">
										<i class="fa fa-save fa-fw"></i>
										<?php echo $this -> lang -> line('button_update'); ?>
									</button>
									<button id="clear" name="clear" class="btn btn-warning" type="button" onclick="goBack();">
										<i class="fa fa-repeat fa-fw"></i>
										<?php echo $this -> lang -> line('button_cancel'); ?>
									</button>
								</div>
							</div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
</form>                   	
			